package com.example.project.entity;

import java.time.LocalDate;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.example.project.annotation.Excel;
import com.example.project.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 时间记录对象 t_time_entrie
 * 
 * @author ruoyi
 * @date 2025-11-17
 */
public class TimeEntrie extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**  */
	private Long id;

	/** 项目ID */
	@Excel(name = "项目ID")
	private Long projectId;

	/** 执行工时的用户ID */
	@Excel(name = "执行工时的用户ID")
	private Long userId;

	/** 记录创建者ID */
	@Excel(name = "记录创建者ID")
	private Long authorId;

	private String authorName;

	/** 关联的问题ID（可选） */
	@Excel(name = "关联的问题ID", readConverterExp = "可=选")
	private Long issueId;

	/** 工时数量 */
	@Excel(name = "工时数量")
	private String hours;

	private String formatHours;

	/** 备注说明 */
	@Excel(name = "备注说明")
	private String comment;

	/** 活动类型ID */
	@Excel(name = "活动类型ID")
	private Long activityId;

	private String activityName;

	/** 工时日期 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@Excel(name = "工时日期", width = 30, dateFormat = "yyyy-MM-dd")
	private LocalDate spentOn;

	/** 年份（用于报表优化） */
	@Excel(name = "年份", readConverterExp = "用=于报表优化")
	private int tyear;

	/** 月份（用于报表优化） */
	@Excel(name = "月份", readConverterExp = "用=于报表优化")
	private int tmonth;

	/** 周数（用于报表优化） */
	@Excel(name = "周数", readConverterExp = "用=于报表优化")
	private int tweek;

	/** 删除标志（0代表存在 1代表删除） */
	private int delFlag;

	private String timeSinceCreation;

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public void setProjectId(Long projectId) {
		this.projectId = projectId;
	}

	public Long getProjectId() {
		return projectId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setAuthorId(Long authorId) {
		this.authorId = authorId;
	}

	public Long getAuthorId() {
		return authorId;
	}

	public String getAuthorName() {
		return authorName;
	}

	public void setAuthorName(String authorName) {
		this.authorName = authorName;
	}

	public void setIssueId(Long issueId) {
		this.issueId = issueId;
	}

	public Long getIssueId() {
		return issueId;
	}

	public void setHours(String hours) {
		this.hours = hours;
	}

	public String getHours() {
		return hours;
	}

	public String getFormatHours() {
		return formatHours;
	}

	public void setFormatHours(String formatHours) {
		this.formatHours = formatHours;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getComment() {
		return comment;
	}

	public void setActivityId(Long activityId) {
		this.activityId = activityId;
	}

	public Long getActivityId() {
		return activityId;
	}

	public String getActivityName() {
		return activityName;
	}

	public void setActivityName(String activityName) {
		this.activityName = activityName;
	}

	public void setSpentOn(LocalDate spentOn) {
		this.spentOn = spentOn;
	}

	public LocalDate getSpentOn() {
		return spentOn;
	}

	public void setTyear(int year) {
		this.tyear = year;
	}

	public int getTyear() {
		return tyear;
	}

	public void setTmonth(int tmonth) {
		this.tmonth = tmonth;
	}

	public int getTmonth() {
		return tmonth;
	}

	public void setTweek(int tweek) {
		this.tweek = tweek;
	}

	public int getTweek() {
		return tweek;
	}

	public void setDelFlag(int delFlag) {
		this.delFlag = delFlag;
	}

	public int getDelFlag() {
		return delFlag;
	}

	public String getTimeSinceCreation() {
		return timeSinceCreation;
	}

	public void setTimeSinceCreation(String timeSinceCreation) {
		this.timeSinceCreation = timeSinceCreation;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
				.append("projectId", getProjectId()).append("userId", getUserId()).append("authorId", getAuthorId())
				.append("issueId", getIssueId()).append("hours", getHours()).append("comment", getComment())
				.append("activityId", getActivityId()).append("spentOn", getSpentOn()).append("tyear", getTyear())
				.append("tmonth", getTmonth()).append("tweek", getTweek()).append("delFlag", getDelFlag())
				.append("createBy", getCreateBy()).append("createTime", getCreateTime())
				.append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).toString();
	}
}
